-----------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/cmailhot/Desktop/Mailhot. MIOM Dataset. ISQ Replication.log
  log type:  text
 opened on:   3 Feb 2025, 18:01:09

. clear

. 
. set more off

. 
. 
. * Note: Analysis run using Stata MP 14.1

. 
. * Package Installations

. *net install grc1leg, from( http://www.stata.com/users/vwiggins/) 

. 
.  
. * Set working directory 

. *Note: Make sure to update the directory to the location of the folder ("Mailhot. MIOM Data Replica
> tion. ISQ") on your computer

. 
. cd "/Users/cmailhot/Desktop/Mailhot. MIOM Data Replication. ISQ"
/Users/cmailhot/Desktop/Mailhot. MIOM Data Replication. ISQ

. 
. * Table 1

. 
. use "Table 1.dta"

. 
. export excel using "Table 1.xlsx", firstrow(variables) replace
file Table 1.xlsx saved

. 
. clear

. 
. 
. * Table 2

. 
. use "Table 2.dta"

. 
. export excel using "Table 2.xlsx", firstrow(variables) replace
file Table 2.xlsx saved

. 
. clear

. 
. * Table 3

. 
.  
. use "Table 3.dta"

. 
. export excel using "Table 3.xlsx", firstrow(variables) replace
file Table 3.xlsx saved

. 
. clear

. 
. 
. * Figure 1

. 
. use "Figure 1.dta"

. 
. 
. 
. graph bar IOSumMandatePoliceRef IOSumMandateHR IOSumMandateCeaseFire IOSumMandateCivilAdminReform I
> OSumMandateMediaReform IOSumMandateMilitaryReform if IntlOrganization == "UN",  title("UN") blabel(
> total) saving("Components of Figure 1/UN.gph", replace)
(file Components of Figure 1/UN.gph saved)

. 
. graph bar IOSumMandatePoliceRef IOSumMandateHR IOSumMandateCeaseFire IOSumMandateCivilAdminReform I
> OSumMandateMediaReform IOSumMandateMilitaryReform if IntlOrganization == "AU",  title("AU") blabel(
> total) saving("Components of Figure 1/AU.gph", replace) 
(file Components of Figure 1/AU.gph saved)

. 
. graph bar IOSumMandatePoliceRef IOSumMandateHR IOSumMandateCeaseFire IOSumMandateCivilAdminReform I
> OSumMandateMediaReform IOSumMandateMilitaryReform if IntlOrganization == "OSCE",  title("OSCE") bla
> bel(total) saving("Components of Figure 1/OSCE.gph", replace) 
(file Components of Figure 1/OSCE.gph saved)

. 
. graph bar IOSumMandatePoliceRef IOSumMandateHR IOSumMandateCeaseFire IOSumMandateCivilAdminReform I
> OSumMandateMediaReform IOSumMandateMilitaryReform if IntlOrganization == "NATO",  title("NATO") bla
> bel(total) saving("Components of Figure 1/NATO.gph", replace) 
(file Components of Figure 1/NATO.gph saved)

. 
. graph bar IOSumMandatePoliceRef IOSumMandateHR IOSumMandateCeaseFire IOSumMandateCivilAdminReform I
> OSumMandateMediaReform IOSumMandateMilitaryReform if IntlOrganization == "EU",  title("EU") blabel(
> total) saving("Components of Figure 1/EU.gph", replace) 
(file Components of Figure 1/EU.gph saved)

. 
. graph bar IOSumMandatePoliceRef IOSumMandateHR IOSumMandateCeaseFire IOSumMandateCivilAdminReform I
> OSumMandateMediaReform IOSumMandateMilitaryReform if IntlOrganization == "OAS",  title("OAS") blabe
> l(total) saving("Components of Figure 1/OAS.gph", replace) 
(file Components of Figure 1/OAS.gph saved)

. 
. 
. grc1leg "Components of Figure 1/UN.gph" "Components of Figure 1/AU.gph" "Components of Figure 1/EU.
> gph" "Components of Figure 1/NATO.gph" "Components of Figure 1/OAS.gph" "Components of Figure 1/OSC
> E.gph", play("Figure 1 partial.grec")
label[1] edits
(note:  edit not appropriate for current graph)
label[3] edits
(note:  edit not appropriate for current graph)
label[5] edits
(note:  edit not appropriate for current graph)
label[2] edits
(note:  edit not appropriate for current graph)
label[4] edits
(note:  edit not appropriate for current graph)
label[6] edits
(note:  edit not appropriate for current graph)
legend color
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[3] color
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[3] color
(note:  edit not appropriate for current graph)
key[3] color
(note:  edit not appropriate for current graph)
key[5] color
(note:  edit not appropriate for current graph)
key[2] color
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[3] color
(note:  edit not appropriate for current graph)
key[4] color
(note:  edit not appropriate for current graph)
key[5] color
(note:  edit not appropriate for current graph)
key[6] color
(note:  edit not appropriate for current graph)
key[6] color
(note:  edit not appropriate for current graph)
key[6] edits
(note:  edit not appropriate for current graph)

. graph save Graph "Components of Figure 1/Figure 1 Partial.gph", replace
(file Components of Figure 1/Figure 1 Partial.gph saved)

. 
. graph use "Components of Figure 1/Figure 1 Partial.gph", play("Figure 1 full.grec")

. graph save Graph "Figure 1.gph", replace
(file Figure 1.gph saved)

. 
. clear

. 
. * Figure 2

. 
. use "Figure 2.dta"

. 
. 
. graph bar CeasefirePercent ChildrensRightsPercent DisarmPercent ElectionPercent JudicialPercent Pol
> icePercent, blabel(total) bargap(10) play("Figure 2.grec")

. graph save Graph "Figure 2.gph", replace
(file Figure 2.gph saved)

. 
. clear

. 
. 
. * Figure 3

. 
. use "Figure 3.dta"

. 
. line WomensRightsYearlyProp MandateResYear || line ChildrensRightsYearlyProp MandateResYear ||  lin
> e MilitaryReformYearlyProp MandateResYear ||  line EconSocDevYearlyProp MandateResYear ||  line Exe
> cReformYearlyProp MandateResYear ||  line MediaReformYearlyProp MandateResYear , play("Figure 3.gre
> c")

. graph save Graph "Figure 3.gph", replace
(file Figure 3.gph saved)

. 
. clear

. 
. 
. 
. 
. 
. * Figure 4 and Table B1 (Appendix)

. 
. use "Replication_Data_for_Built-in_Safeguards. With MIOM Data_Subsetted.dta"

. 
. 
. *Labeling Variables

. label variable agg_imp_rate_woe "Accord Implementation Rate (0-100)"

. label variable powtran_implem "Powershairng government (0-3)"

. label variable dispute_implem "Dispute Resolution Mechanism (0-3)"

. label variable verify_implem "Verification Mechanism (0-3)"

. label variable donor_implem  "Donor Support (0-3)"

. label variable unpkf_implem "Agreement UN/Regional Mission(0-3)"

. label variable roa_implem  "Review of Agreement (0-3)"

. label variable total_prov_woe "Number of Provisions"

. label variable ex_constrain5_7 "Executive Constraints"

. label variable conflict_type "Conflict Type (1 = Territorial)"

. label variable infant_rate "Infant Mortality Rate"

. label variable gdppc_currus_1000 "GDP Per Capita in 1000s (2005 USD)"

. label variable year_count "Year Count"

. label variable con_conflict "Post Accord Conflict"

. label variable war_dur "War Duration (months)"

. label variable total_dead "Total Dead"

. label variable meanprov "Difference in Number of Agreement Provisions"

. label variable PropProvisionsWithEnforcement "Proportion of Provisions with Mandated Enforcement (M
> IOM)"

. label variable ProportionLevelofInvolve "Proportion Level of Mandated Enforcement (MIOM)"

. 
. *Define Data as Time Series Data

. xtset caseid year_count
       panel variable:  caseid (unbalanced)
        time variable:  year_count, 1 to 10
                delta:  1 unit

. 
. 
. *replication: Proportion of provisions with mandated enforcement

. 
. estimates clear

. 
. xtgls agg_imp_rate_woe verify_implem  powtran_implem dispute_implem donor_implem  unpkf_implem roa_
> implem  meanprov  ex_constrain5_7 conflict_type infant_rate gdppc_currus_1000    year_count  if exc
> lude_case !=1, corr(psar1)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        homoskedastic
Correlation:   panel-specific AR(1)

Estimated covariances      =         1          Number of obs     =        303
Estimated autocorrelations =        34          Number of groups  =         34
Estimated coefficients     =        13          Obs per group:
                                                              min =          2
                                                              avg =   8.911765
                                                              max =         10
                                                Wald chi2(12)     =     604.28
                                                Prob > chi2       =     0.0000

-----------------------------------------------------------------------------------
 agg_imp_rate_woe |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
    verify_implem |   9.840579   .8688895    11.33   0.000     8.137587    11.54357
   powtran_implem |    2.16131   .6777409     3.19   0.001     .8329621    3.489658
   dispute_implem |   3.874413   .7423234     5.22   0.000     2.419486     5.32934
     donor_implem |   2.979475   .7293124     4.09   0.000     1.550049    4.408901
     unpkf_implem |  -2.691155   .7726225    -3.48   0.000    -4.205467   -1.176842
       roa_implem |  -.4358091    .909437    -0.48   0.632    -2.218273    1.346655
         meanprov |  -1.415812    .253109    -5.59   0.000    -1.911897   -.9197277
  ex_constrain5_7 |   2.212541   1.595777     1.39   0.166    -.9151246    5.340206
    conflict_type |   3.766512   2.566151     1.47   0.142    -1.263051    8.796076
      infant_rate |  -.0655792   .0321746    -2.04   0.042    -.1286403   -.0025182
gdppc_currus_1000 |   .0519295   .1103894     0.47   0.638    -.1644297    .2682887
       year_count |   2.845015   .2611188    10.90   0.000     2.333232    3.356799
            _cons |   23.11705    4.20718     5.49   0.000     14.87113    31.36297
-----------------------------------------------------------------------------------

. eststo replication

. 
. xtgls agg_imp_rate_woe l.agg_imp_rate_woe PropProvisionsWithEnforcement powtran_implem dispute_impl
> em donor_implem  roa_implem  meanprov ex_constrain5_7 conflict_type infant_rate   year_count gdppc_
> currus_1000 

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        homoskedastic
Correlation:   no autocorrelation

Estimated covariances      =         1          Number of obs     =        270
Estimated autocorrelations =         0          Number of groups  =         34
Estimated coefficients     =        13          Obs per group:
                                                              min =          1
                                                              avg =   7.941176
                                                              max =          9
                                                Wald chi2(12)     =    3134.11
Log likelihood             = -857.1288          Prob > chi2       =     0.0000

-----------------------------------------------------------------------------------------------
             agg_imp_rate_woe |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------+----------------------------------------------------------------
             agg_imp_rate_woe |
                          L1. |   .9148794   .0204454    44.75   0.000     .8748071    .9549518
                              |
PropProvisionsWithEnforcement |    5.64994   1.794602     3.15   0.002     2.132584    9.167296
               powtran_implem |   .3318254   .3370154     0.98   0.325    -.3287126    .9923634
               dispute_implem |   .3375229   .3063236     1.10   0.271    -.2628603     .937906
                 donor_implem |   .6233408   .3254361     1.92   0.055    -.0145023    1.261184
                   roa_implem |  -.1394958    .416563    -0.33   0.738    -.9559444    .6769527
                     meanprov |  -.1208981   .0707838    -1.71   0.088    -.2596317    .0178355
              ex_constrain5_7 |   .3113253   .8238076     0.38   0.705    -1.303308    1.925959
                conflict_type |  -.1978828   .8928078    -0.22   0.825    -1.947754    1.551988
                  infant_rate |   .0152207   .0115166     1.32   0.186    -.0073515    .0377928
                   year_count |  -.7070768   .1688925    -4.19   0.000      -1.0381   -.3760535
            gdppc_currus_1000 |   .1786205   .0780254     2.29   0.022     .0256935    .3315475
                        _cons |   9.216656   1.793952     5.14   0.000     5.700574    12.73274
-----------------------------------------------------------------------------------------------

. eststo propenforcextreglag

. 
. xtgls agg_imp_rate_woe l.agg_imp_rate_woe ProportionLevelofInvolve powtran_implem dispute_implem do
> nor_implem  roa_implem  meanprov  ex_constrain5_7 conflict_type infant_rate  year_count gdppc_curru
> s_1000 

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        homoskedastic
Correlation:   no autocorrelation

Estimated covariances      =         1          Number of obs     =        270
Estimated autocorrelations =         0          Number of groups  =         34
Estimated coefficients     =        13          Obs per group:
                                                              min =          1
                                                              avg =   7.941176
                                                              max =          9
                                                Wald chi2(12)     =    3123.00
Log likelihood             = -857.5703          Prob > chi2       =     0.0000

------------------------------------------------------------------------------------------
        agg_imp_rate_woe |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------------------+----------------------------------------------------------------
        agg_imp_rate_woe |
                     L1. |   .9144906   .0204752    44.66   0.000       .87436    .9546212
                         |
ProportionLevelofInvolve |    6.06947   2.023394     3.00   0.003     2.103692    10.03525
          powtran_implem |   .3062672   .3406394     0.90   0.369    -.3613739    .9739082
          dispute_implem |   .3266652   .3071591     1.06   0.288    -.2753557    .9286861
            donor_implem |   .5935074   .3282646     1.81   0.071    -.0498794    1.236894
              roa_implem |  -.1219454   .4170039    -0.29   0.770    -.9392581    .6953673
                meanprov |  -.1109914   .0713726    -1.56   0.120    -.2508792    .0288963
         ex_constrain5_7 |   .2641157    .823833     0.32   0.749    -1.350567    1.878799
           conflict_type |  -.2080959   .8948681    -0.23   0.816    -1.962005    1.545813
             infant_rate |   .0155765   .0115738     1.35   0.178    -.0071077    .0382607
              year_count |  -.7224225   .1684405    -4.29   0.000     -1.05256   -.3922851
       gdppc_currus_1000 |   .1758253   .0781117     2.25   0.024     .0227292    .3289215
                   _cons |   9.471076   1.780246     5.32   0.000     5.981859    12.96029
------------------------------------------------------------------------------------------

. eststo levelofinvolvextreglag

. 
. * Figure 4

. coefplot (replication, keep(verify_implem unpkf_implem)) (propenforcextreglag, keep(PropProvisionsW
> ithEnforcement)) (levelofinvolvextreglag, keep(ProportionLevelofInvolve)), play("Figure 4.grec")

. 
. * Results for Figure 4 in appendix

. esttab replication propenforcextreglag levelofinvolvextreglag using TableB1Appendix.rtf, star(* 0.0
> 5 ** 0.01 *** 0.001) b(2) se(2) stats(N aic r2 p) label noconstant replace
(note: file TableB1Appendix.rtf not found)
(output written to TableB1Appendix.rtf)

. 
. clear

. 
. 
. * Figure A2 in Appendix (comparison of activities in UNPMM nad MIOM)

. 
. use "Comparison of UNPMM and MIOM.dta"

. 
. graph bar UNPMMMeanActivitiesByMission MIOMMeanActivitiesByMission if mission_abbrev == "UNMIL",  t
> itle("UNMIL") blabel(total) saving("Components of Figure A2/UNMIL.gph", replace)
(file Components of Figure A2/UNMIL.gph saved)

. 
. graph bar UNPMMMeanActivitiesByMission MIOMMeanActivitiesByMission if mission_abbrev == "UNTAES",  
> title("UNTAES") blabel(total) saving("Components of Figure A2/UNTAES.gph", replace)
(file Components of Figure A2/UNTAES.gph saved)

. 
. graph bar UNPMMMeanActivitiesByMission MIOMMeanActivitiesByMission if mission_abbrev == "UNAMA",  t
> itle("UNAMA") blabel(total) saving("Components of Figure A2/UNAMA.gph", replace)
(file Components of Figure A2/UNAMA.gph saved)

. 
. graph bar UNPMMMeanActivitiesByMission MIOMMeanActivitiesByMission if mission_abbrev == "ONUSAL",  
> title("ONUSAL") blabel(total) saving("Components of Figure A2/ONUSAL.gph", replace)
(file Components of Figure A2/ONUSAL.gph saved)

. 
. graph bar UNPMMMeanActivitiesByMission MIOMMeanActivitiesByMission if mission_abbrev == "UNTAC",  t
> itle("UNTAC") blabel(total) saving("Components of Figure A2/UNTAC.gph", replace)
(file Components of Figure A2/UNTAC.gph saved)

. 
. grc1leg "Components of Figure A2/UNMIL" "Components of Figure A2/UNTAES" "Components of Figure A2/U
> NAMA" "Components of Figure A2/ONUSAL" "Components of Figure A2/UNTAC", play("Components of Figure 
> A2/Figure A2 in Appendix partial.grec")
label[1] edits
(note:  edit not appropriate for current graph)
label[2] edits
(note:  edit not appropriate for current graph)
key[1] color
(note:  edit not appropriate for current graph)
key[2] color
(note:  edit not appropriate for current graph)
legend color
(note:  edit not appropriate for current graph)

. graph save Graph "Components of Figure A2/Figure A2 Partial.gph", replace
(file Components of Figure A2/Figure A2 Partial.gph saved)

. 
. graph use "Components of Figure A2/Figure A2 Partial.gph", play("Figure A2 full.grec")

. graph save Graph "Figure A2.gph", replace
(file Figure A2.gph saved)

. 
. 
. clear

. 
. log close
      name:  <unnamed>
       log:  /Users/cmailhot/Desktop/Mailhot. MIOM Dataset. ISQ Replication.log
  log type:  text
 closed on:   3 Feb 2025, 18:02:05
-----------------------------------------------------------------------------------------------------
